/**
 * 转换组件或者其他数据
 */

import { Recordable } from "/#/global";

/**
 * 转换list集合到select项
 */
export function convertSelectOptions(
  data: Array<Recordable>
): Array<Recordable> {
  const convertData = data.map((i) => ({
    label: i.name,
    value: i,
    disabled: i.disabled,
  }));
  console.log(convertData);
  return convertData;
}
